-- Copyright (c) 2024 Huawei Technologies Co., Ltd.
-- openUBMC is licensed under Mulan PSL v2.
-- You can use this software according to the terms and conditions of the Mulan PSL v2.
-- You may obtain a copy of Mulan PSL v2 at:
--          http://license.coscl.org.cn/MulanPSL2
-- THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
-- EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
-- MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
-- See the Mulan PSL v2 for more details.
local validate = require 'mc.validate'
local utils = require 'mc.utils'
local mdb = require 'mc.mdb'

local EnergyMetric = {}

---@class EnergyMetric.PredictedPowerSavedDataItem
---@field Time string
---@field PredictedPowerSavedWatts integer
local TPredictedPowerSavedDataItem = {}
TPredictedPowerSavedDataItem.__index = TPredictedPowerSavedDataItem
TPredictedPowerSavedDataItem.group = {}

local function TPredictedPowerSavedDataItem_from_obj(obj)
    return setmetatable(obj, TPredictedPowerSavedDataItem)
end

function TPredictedPowerSavedDataItem.new(Time, PredictedPowerSavedWatts)
    return TPredictedPowerSavedDataItem_from_obj({Time = Time, PredictedPowerSavedWatts = PredictedPowerSavedWatts})
end
---@param obj EnergyMetric.PredictedPowerSavedDataItem
function TPredictedPowerSavedDataItem:init_from_obj(obj)
    self.Time = obj.Time
    self.PredictedPowerSavedWatts = obj.PredictedPowerSavedWatts
end

function TPredictedPowerSavedDataItem:remove_error_props(errs, obj)
    utils.remove_obj_error_property(obj, errs, TPredictedPowerSavedDataItem.group)
end

TPredictedPowerSavedDataItem.from_obj = TPredictedPowerSavedDataItem_from_obj

TPredictedPowerSavedDataItem.proto_property = {'Time', 'PredictedPowerSavedWatts'}

TPredictedPowerSavedDataItem.default = {'', 0}

TPredictedPowerSavedDataItem.struct = {
    {name = 'Time', is_array = false, struct = nil}, {name = 'PredictedPowerSavedWatts', is_array = false, struct = nil}
}

function TPredictedPowerSavedDataItem:validate(prefix, errs, need_convert)
    prefix = prefix or ''

    validate.Optional(prefix .. 'Time', self.Time, 'string', false, errs, need_convert)
    validate.Optional(prefix .. 'PredictedPowerSavedWatts', self.PredictedPowerSavedWatts, 'uint32', false, errs,
        need_convert)

    TPredictedPowerSavedDataItem:remove_error_props(errs, self)
    validate.CheckUnknowProperty(self, TPredictedPowerSavedDataItem.proto_property, errs, need_convert)
    return self
end

function TPredictedPowerSavedDataItem:unpack(_)
    return self.Time, self.PredictedPowerSavedWatts
end

EnergyMetric.PredictedPowerSavedDataItem = TPredictedPowerSavedDataItem

---@class EnergyMetric.PredictedPowerDataItem
---@field Time string
---@field PredictedPowerWatts integer
local TPredictedPowerDataItem = {}
TPredictedPowerDataItem.__index = TPredictedPowerDataItem
TPredictedPowerDataItem.group = {}

local function TPredictedPowerDataItem_from_obj(obj)
    return setmetatable(obj, TPredictedPowerDataItem)
end

function TPredictedPowerDataItem.new(Time, PredictedPowerWatts)
    return TPredictedPowerDataItem_from_obj({Time = Time, PredictedPowerWatts = PredictedPowerWatts})
end
---@param obj EnergyMetric.PredictedPowerDataItem
function TPredictedPowerDataItem:init_from_obj(obj)
    self.Time = obj.Time
    self.PredictedPowerWatts = obj.PredictedPowerWatts
end

function TPredictedPowerDataItem:remove_error_props(errs, obj)
    utils.remove_obj_error_property(obj, errs, TPredictedPowerDataItem.group)
end

TPredictedPowerDataItem.from_obj = TPredictedPowerDataItem_from_obj

TPredictedPowerDataItem.proto_property = {'Time', 'PredictedPowerWatts'}

TPredictedPowerDataItem.default = {'', 0}

TPredictedPowerDataItem.struct = {
    {name = 'Time', is_array = false, struct = nil}, {name = 'PredictedPowerWatts', is_array = false, struct = nil}
}

function TPredictedPowerDataItem:validate(prefix, errs, need_convert)
    prefix = prefix or ''

    validate.Optional(prefix .. 'Time', self.Time, 'string', false, errs, need_convert)
    validate.Optional(prefix .. 'PredictedPowerWatts', self.PredictedPowerWatts, 'uint32', false, errs, need_convert)

    TPredictedPowerDataItem:remove_error_props(errs, self)
    validate.CheckUnknowProperty(self, TPredictedPowerDataItem.proto_property, errs, need_convert)
    return self
end

function TPredictedPowerDataItem:unpack(_)
    return self.Time, self.PredictedPowerWatts
end

EnergyMetric.PredictedPowerDataItem = TPredictedPowerDataItem

---@class EnergyMetric.PowerHistoryDataItem
---@field Time string
---@field PowerWatts integer
---@field PowerAverageWatts integer
---@field PowerPeakWatts integer
local TPowerHistoryDataItem = {}
TPowerHistoryDataItem.__index = TPowerHistoryDataItem
TPowerHistoryDataItem.group = {}

local function TPowerHistoryDataItem_from_obj(obj)
    return setmetatable(obj, TPowerHistoryDataItem)
end

function TPowerHistoryDataItem.new(Time, PowerWatts, PowerAverageWatts, PowerPeakWatts)
    return TPowerHistoryDataItem_from_obj({
        Time = Time,
        PowerWatts = PowerWatts,
        PowerAverageWatts = PowerAverageWatts,
        PowerPeakWatts = PowerPeakWatts
    })
end
---@param obj EnergyMetric.PowerHistoryDataItem
function TPowerHistoryDataItem:init_from_obj(obj)
    self.Time = obj.Time
    self.PowerWatts = obj.PowerWatts
    self.PowerAverageWatts = obj.PowerAverageWatts
    self.PowerPeakWatts = obj.PowerPeakWatts
end

function TPowerHistoryDataItem:remove_error_props(errs, obj)
    utils.remove_obj_error_property(obj, errs, TPowerHistoryDataItem.group)
end

TPowerHistoryDataItem.from_obj = TPowerHistoryDataItem_from_obj

TPowerHistoryDataItem.proto_property = {'Time', 'PowerWatts', 'PowerAverageWatts', 'PowerPeakWatts'}

TPowerHistoryDataItem.default = {'', 0, 0, 0}

TPowerHistoryDataItem.struct = {
    {name = 'Time', is_array = false, struct = nil}, {name = 'PowerWatts', is_array = false, struct = nil},
    {name = 'PowerAverageWatts', is_array = false, struct = nil},
    {name = 'PowerPeakWatts', is_array = false, struct = nil}
}

function TPowerHistoryDataItem:validate(prefix, errs, need_convert)
    prefix = prefix or ''

    validate.Optional(prefix .. 'Time', self.Time, 'string', false, errs, need_convert)
    validate.Optional(prefix .. 'PowerWatts', self.PowerWatts, 'uint32', false, errs, need_convert)
    validate.Optional(prefix .. 'PowerAverageWatts', self.PowerAverageWatts, 'uint32', false, errs, need_convert)
    validate.Optional(prefix .. 'PowerPeakWatts', self.PowerPeakWatts, 'uint32', false, errs, need_convert)

    TPowerHistoryDataItem:remove_error_props(errs, self)
    validate.CheckUnknowProperty(self, TPowerHistoryDataItem.proto_property, errs, need_convert)
    return self
end

function TPowerHistoryDataItem:unpack(_)
    return self.Time, self.PowerWatts, self.PowerAverageWatts, self.PowerPeakWatts
end

EnergyMetric.PowerHistoryDataItem = TPowerHistoryDataItem

---@class EnergyMetric.MaxPowerWatts
---@field MaxPowerWatts integer
local TMaxPowerWatts = {}
TMaxPowerWatts.__index = TMaxPowerWatts
TMaxPowerWatts.group = {}

local function TMaxPowerWatts_from_obj(obj)
    return setmetatable(obj, TMaxPowerWatts)
end

function TMaxPowerWatts.new(MaxPowerWatts)
    return TMaxPowerWatts_from_obj({MaxPowerWatts = MaxPowerWatts})
end
---@param obj EnergyMetric.MaxPowerWatts
function TMaxPowerWatts:init_from_obj(obj)
    self.MaxPowerWatts = obj.MaxPowerWatts
end

function TMaxPowerWatts:remove_error_props(errs, obj)
    utils.remove_obj_error_property(obj, errs, TMaxPowerWatts.group)
end

TMaxPowerWatts.from_obj = TMaxPowerWatts_from_obj

TMaxPowerWatts.proto_property = {'MaxPowerWatts'}

TMaxPowerWatts.default = {0}

TMaxPowerWatts.struct = {{name = 'MaxPowerWatts', is_array = false, struct = nil}}

function TMaxPowerWatts:validate(prefix, errs, need_convert)
    prefix = prefix or ''

    validate.Optional(prefix .. 'MaxPowerWatts', self.MaxPowerWatts, 'uint32', true, errs, need_convert)

    TMaxPowerWatts:remove_error_props(errs, self)
    validate.CheckUnknowProperty(self, TMaxPowerWatts.proto_property, errs, need_convert)
    return self
end

function TMaxPowerWatts:unpack(_)
    return self.MaxPowerWatts
end

EnergyMetric.MaxPowerWatts = TMaxPowerWatts

---@class EnergyMetric.MinPowerWatts
---@field MinPowerWatts integer
local TMinPowerWatts = {}
TMinPowerWatts.__index = TMinPowerWatts
TMinPowerWatts.group = {}

local function TMinPowerWatts_from_obj(obj)
    return setmetatable(obj, TMinPowerWatts)
end

function TMinPowerWatts.new(MinPowerWatts)
    return TMinPowerWatts_from_obj({MinPowerWatts = MinPowerWatts})
end
---@param obj EnergyMetric.MinPowerWatts
function TMinPowerWatts:init_from_obj(obj)
    self.MinPowerWatts = obj.MinPowerWatts
end

function TMinPowerWatts:remove_error_props(errs, obj)
    utils.remove_obj_error_property(obj, errs, TMinPowerWatts.group)
end

TMinPowerWatts.from_obj = TMinPowerWatts_from_obj

TMinPowerWatts.proto_property = {'MinPowerWatts'}

TMinPowerWatts.default = {0}

TMinPowerWatts.struct = {{name = 'MinPowerWatts', is_array = false, struct = nil}}

function TMinPowerWatts:validate(prefix, errs, need_convert)
    prefix = prefix or ''

    validate.Optional(prefix .. 'MinPowerWatts', self.MinPowerWatts, 'uint32', true, errs, need_convert)

    TMinPowerWatts:remove_error_props(errs, self)
    validate.CheckUnknowProperty(self, TMinPowerWatts.proto_property, errs, need_convert)
    return self
end

function TMinPowerWatts:unpack(_)
    return self.MinPowerWatts
end

EnergyMetric.MinPowerWatts = TMinPowerWatts

---@class EnergyMetric.HistoryPowerAverageWatts
---@field HistoryPowerAverageWatts integer
local THistoryPowerAverageWatts = {}
THistoryPowerAverageWatts.__index = THistoryPowerAverageWatts
THistoryPowerAverageWatts.group = {}

local function THistoryPowerAverageWatts_from_obj(obj)
    return setmetatable(obj, THistoryPowerAverageWatts)
end

function THistoryPowerAverageWatts.new(HistoryPowerAverageWatts)
    return THistoryPowerAverageWatts_from_obj({HistoryPowerAverageWatts = HistoryPowerAverageWatts})
end
---@param obj EnergyMetric.HistoryPowerAverageWatts
function THistoryPowerAverageWatts:init_from_obj(obj)
    self.HistoryPowerAverageWatts = obj.HistoryPowerAverageWatts
end

function THistoryPowerAverageWatts:remove_error_props(errs, obj)
    utils.remove_obj_error_property(obj, errs, THistoryPowerAverageWatts.group)
end

THistoryPowerAverageWatts.from_obj = THistoryPowerAverageWatts_from_obj

THistoryPowerAverageWatts.proto_property = {'HistoryPowerAverageWatts'}

THistoryPowerAverageWatts.default = {0}

THistoryPowerAverageWatts.struct = {{name = 'HistoryPowerAverageWatts', is_array = false, struct = nil}}

function THistoryPowerAverageWatts:validate(prefix, errs, need_convert)
    prefix = prefix or ''

    validate.Optional(prefix .. 'HistoryPowerAverageWatts', self.HistoryPowerAverageWatts, 'uint32', true, errs,
        need_convert)

    THistoryPowerAverageWatts:remove_error_props(errs, self)
    validate.CheckUnknowProperty(self, THistoryPowerAverageWatts.proto_property, errs, need_convert)
    return self
end

function THistoryPowerAverageWatts:unpack(_)
    return self.HistoryPowerAverageWatts
end

EnergyMetric.HistoryPowerAverageWatts = THistoryPowerAverageWatts

---@class EnergyMetric.PowerPredictDescription
---@field PowerPredictDescription string
local TPowerPredictDescription = {}
TPowerPredictDescription.__index = TPowerPredictDescription
TPowerPredictDescription.group = {}

local function TPowerPredictDescription_from_obj(obj)
    return setmetatable(obj, TPowerPredictDescription)
end

function TPowerPredictDescription.new(PowerPredictDescription)
    return TPowerPredictDescription_from_obj({PowerPredictDescription = PowerPredictDescription})
end
---@param obj EnergyMetric.PowerPredictDescription
function TPowerPredictDescription:init_from_obj(obj)
    self.PowerPredictDescription = obj.PowerPredictDescription
end

function TPowerPredictDescription:remove_error_props(errs, obj)
    utils.remove_obj_error_property(obj, errs, TPowerPredictDescription.group)
end

TPowerPredictDescription.from_obj = TPowerPredictDescription_from_obj

TPowerPredictDescription.proto_property = {'PowerPredictDescription'}

TPowerPredictDescription.default = {''}

TPowerPredictDescription.struct = {{name = 'PowerPredictDescription', is_array = false, struct = nil}}

function TPowerPredictDescription:validate(prefix, errs, need_convert)
    prefix = prefix or ''

    validate.Optional(prefix .. 'PowerPredictDescription', self.PowerPredictDescription, 'string', true, errs,
        need_convert)

    TPowerPredictDescription:remove_error_props(errs, self)
    validate.CheckUnknowProperty(self, TPowerPredictDescription.proto_property, errs, need_convert)
    return self
end

function TPowerPredictDescription:unpack(_)
    return self.PowerPredictDescription
end

EnergyMetric.PowerPredictDescription = TPowerPredictDescription

---@class EnergyMetric.PowerPredictStatus
---@field PowerPredictStatus integer
local TPowerPredictStatus = {}
TPowerPredictStatus.__index = TPowerPredictStatus
TPowerPredictStatus.group = {}

local function TPowerPredictStatus_from_obj(obj)
    return setmetatable(obj, TPowerPredictStatus)
end

function TPowerPredictStatus.new(PowerPredictStatus)
    return TPowerPredictStatus_from_obj({PowerPredictStatus = PowerPredictStatus})
end
---@param obj EnergyMetric.PowerPredictStatus
function TPowerPredictStatus:init_from_obj(obj)
    self.PowerPredictStatus = obj.PowerPredictStatus
end

function TPowerPredictStatus:remove_error_props(errs, obj)
    utils.remove_obj_error_property(obj, errs, TPowerPredictStatus.group)
end

TPowerPredictStatus.from_obj = TPowerPredictStatus_from_obj

TPowerPredictStatus.proto_property = {'PowerPredictStatus'}

TPowerPredictStatus.default = {0}

TPowerPredictStatus.struct = {{name = 'PowerPredictStatus', is_array = false, struct = nil}}

function TPowerPredictStatus:validate(prefix, errs, need_convert)
    prefix = prefix or ''

    validate.Optional(prefix .. 'PowerPredictStatus', self.PowerPredictStatus, 'uint8', true, errs, need_convert)

    TPowerPredictStatus:remove_error_props(errs, self)
    validate.CheckUnknowProperty(self, TPowerPredictStatus.proto_property, errs, need_convert)
    return self
end

function TPowerPredictStatus:unpack(_)
    return self.PowerPredictStatus
end

EnergyMetric.PowerPredictStatus = TPowerPredictStatus

---@class EnergyMetric.TotalPowerSavedPercent
---@field TotalPowerSavedPercent number
local TTotalPowerSavedPercent = {}
TTotalPowerSavedPercent.__index = TTotalPowerSavedPercent
TTotalPowerSavedPercent.group = {}

local function TTotalPowerSavedPercent_from_obj(obj)
    return setmetatable(obj, TTotalPowerSavedPercent)
end

function TTotalPowerSavedPercent.new(TotalPowerSavedPercent)
    return TTotalPowerSavedPercent_from_obj({TotalPowerSavedPercent = TotalPowerSavedPercent})
end
---@param obj EnergyMetric.TotalPowerSavedPercent
function TTotalPowerSavedPercent:init_from_obj(obj)
    self.TotalPowerSavedPercent = obj.TotalPowerSavedPercent
end

function TTotalPowerSavedPercent:remove_error_props(errs, obj)
    utils.remove_obj_error_property(obj, errs, TTotalPowerSavedPercent.group)
end

TTotalPowerSavedPercent.from_obj = TTotalPowerSavedPercent_from_obj

TTotalPowerSavedPercent.proto_property = {'TotalPowerSavedPercent'}

TTotalPowerSavedPercent.default = {0}

TTotalPowerSavedPercent.struct = {{name = 'TotalPowerSavedPercent', is_array = false, struct = nil}}

function TTotalPowerSavedPercent:validate(prefix, errs, need_convert)
    prefix = prefix or ''

    validate.Optional(prefix .. 'TotalPowerSavedPercent', self.TotalPowerSavedPercent, 'double', true, errs,
        need_convert)

    TTotalPowerSavedPercent:remove_error_props(errs, self)
    validate.CheckUnknowProperty(self, TTotalPowerSavedPercent.proto_property, errs, need_convert)
    return self
end

function TTotalPowerSavedPercent:unpack(_)
    return self.TotalPowerSavedPercent
end

EnergyMetric.TotalPowerSavedPercent = TTotalPowerSavedPercent

---@class EnergyMetric.TotalPowerSavedKwh
---@field TotalPowerSavedKwh number
local TTotalPowerSavedKwh = {}
TTotalPowerSavedKwh.__index = TTotalPowerSavedKwh
TTotalPowerSavedKwh.group = {}

local function TTotalPowerSavedKwh_from_obj(obj)
    return setmetatable(obj, TTotalPowerSavedKwh)
end

function TTotalPowerSavedKwh.new(TotalPowerSavedKwh)
    return TTotalPowerSavedKwh_from_obj({TotalPowerSavedKwh = TotalPowerSavedKwh})
end
---@param obj EnergyMetric.TotalPowerSavedKwh
function TTotalPowerSavedKwh:init_from_obj(obj)
    self.TotalPowerSavedKwh = obj.TotalPowerSavedKwh
end

function TTotalPowerSavedKwh:remove_error_props(errs, obj)
    utils.remove_obj_error_property(obj, errs, TTotalPowerSavedKwh.group)
end

TTotalPowerSavedKwh.from_obj = TTotalPowerSavedKwh_from_obj

TTotalPowerSavedKwh.proto_property = {'TotalPowerSavedKwh'}

TTotalPowerSavedKwh.default = {0}

TTotalPowerSavedKwh.struct = {{name = 'TotalPowerSavedKwh', is_array = false, struct = nil}}

function TTotalPowerSavedKwh:validate(prefix, errs, need_convert)
    prefix = prefix or ''

    validate.Optional(prefix .. 'TotalPowerSavedKwh', self.TotalPowerSavedKwh, 'double', true, errs, need_convert)

    TTotalPowerSavedKwh:remove_error_props(errs, self)
    validate.CheckUnknowProperty(self, TTotalPowerSavedKwh.proto_property, errs, need_convert)
    return self
end

function TTotalPowerSavedKwh:unpack(_)
    return self.TotalPowerSavedKwh
end

EnergyMetric.TotalPowerSavedKwh = TTotalPowerSavedKwh

---@class EnergyMetric.PredictedPowerSavedPercent
---@field PredictedPowerSavedPercent number
local TPredictedPowerSavedPercent = {}
TPredictedPowerSavedPercent.__index = TPredictedPowerSavedPercent
TPredictedPowerSavedPercent.group = {}

local function TPredictedPowerSavedPercent_from_obj(obj)
    return setmetatable(obj, TPredictedPowerSavedPercent)
end

function TPredictedPowerSavedPercent.new(PredictedPowerSavedPercent)
    return TPredictedPowerSavedPercent_from_obj({PredictedPowerSavedPercent = PredictedPowerSavedPercent})
end
---@param obj EnergyMetric.PredictedPowerSavedPercent
function TPredictedPowerSavedPercent:init_from_obj(obj)
    self.PredictedPowerSavedPercent = obj.PredictedPowerSavedPercent
end

function TPredictedPowerSavedPercent:remove_error_props(errs, obj)
    utils.remove_obj_error_property(obj, errs, TPredictedPowerSavedPercent.group)
end

TPredictedPowerSavedPercent.from_obj = TPredictedPowerSavedPercent_from_obj

TPredictedPowerSavedPercent.proto_property = {'PredictedPowerSavedPercent'}

TPredictedPowerSavedPercent.default = {0}

TPredictedPowerSavedPercent.struct = {{name = 'PredictedPowerSavedPercent', is_array = false, struct = nil}}

function TPredictedPowerSavedPercent:validate(prefix, errs, need_convert)
    prefix = prefix or ''

    validate.Optional(prefix .. 'PredictedPowerSavedPercent', self.PredictedPowerSavedPercent, 'double', true, errs,
        need_convert)

    TPredictedPowerSavedPercent:remove_error_props(errs, self)
    validate.CheckUnknowProperty(self, TPredictedPowerSavedPercent.proto_property, errs, need_convert)
    return self
end

function TPredictedPowerSavedPercent:unpack(_)
    return self.PredictedPowerSavedPercent
end

EnergyMetric.PredictedPowerSavedPercent = TPredictedPowerSavedPercent

---@class EnergyMetric.PredictedPowerSavedKwh
---@field PredictedPowerSavedKwh number
local TPredictedPowerSavedKwh = {}
TPredictedPowerSavedKwh.__index = TPredictedPowerSavedKwh
TPredictedPowerSavedKwh.group = {}

local function TPredictedPowerSavedKwh_from_obj(obj)
    return setmetatable(obj, TPredictedPowerSavedKwh)
end

function TPredictedPowerSavedKwh.new(PredictedPowerSavedKwh)
    return TPredictedPowerSavedKwh_from_obj({PredictedPowerSavedKwh = PredictedPowerSavedKwh})
end
---@param obj EnergyMetric.PredictedPowerSavedKwh
function TPredictedPowerSavedKwh:init_from_obj(obj)
    self.PredictedPowerSavedKwh = obj.PredictedPowerSavedKwh
end

function TPredictedPowerSavedKwh:remove_error_props(errs, obj)
    utils.remove_obj_error_property(obj, errs, TPredictedPowerSavedKwh.group)
end

TPredictedPowerSavedKwh.from_obj = TPredictedPowerSavedKwh_from_obj

TPredictedPowerSavedKwh.proto_property = {'PredictedPowerSavedKwh'}

TPredictedPowerSavedKwh.default = {0}

TPredictedPowerSavedKwh.struct = {{name = 'PredictedPowerSavedKwh', is_array = false, struct = nil}}

function TPredictedPowerSavedKwh:validate(prefix, errs, need_convert)
    prefix = prefix or ''

    validate.Optional(prefix .. 'PredictedPowerSavedKwh', self.PredictedPowerSavedKwh, 'double', true, errs,
        need_convert)

    TPredictedPowerSavedKwh:remove_error_props(errs, self)
    validate.CheckUnknowProperty(self, TPredictedPowerSavedKwh.proto_property, errs, need_convert)
    return self
end

function TPredictedPowerSavedKwh:unpack(_)
    return self.PredictedPowerSavedKwh
end

EnergyMetric.PredictedPowerSavedKwh = TPredictedPowerSavedKwh

---@class EnergyMetric.FanTotalPowerWatts
---@field FanTotalPowerWatts integer
local TFanTotalPowerWatts = {}
TFanTotalPowerWatts.__index = TFanTotalPowerWatts
TFanTotalPowerWatts.group = {}

local function TFanTotalPowerWatts_from_obj(obj)
    return setmetatable(obj, TFanTotalPowerWatts)
end

function TFanTotalPowerWatts.new(FanTotalPowerWatts)
    return TFanTotalPowerWatts_from_obj({FanTotalPowerWatts = FanTotalPowerWatts})
end
---@param obj EnergyMetric.FanTotalPowerWatts
function TFanTotalPowerWatts:init_from_obj(obj)
    self.FanTotalPowerWatts = obj.FanTotalPowerWatts
end

function TFanTotalPowerWatts:remove_error_props(errs, obj)
    utils.remove_obj_error_property(obj, errs, TFanTotalPowerWatts.group)
end

TFanTotalPowerWatts.from_obj = TFanTotalPowerWatts_from_obj

TFanTotalPowerWatts.proto_property = {'FanTotalPowerWatts'}

TFanTotalPowerWatts.default = {0}

TFanTotalPowerWatts.struct = {{name = 'FanTotalPowerWatts', is_array = false, struct = nil}}

function TFanTotalPowerWatts:validate(prefix, errs, need_convert)
    prefix = prefix or ''

    validate.Optional(prefix .. 'FanTotalPowerWatts', self.FanTotalPowerWatts, 'uint32', true, errs, need_convert)

    TFanTotalPowerWatts:remove_error_props(errs, self)
    validate.CheckUnknowProperty(self, TFanTotalPowerWatts.proto_property, errs, need_convert)
    return self
end

function TFanTotalPowerWatts:unpack(_)
    return self.FanTotalPowerWatts
end

EnergyMetric.FanTotalPowerWatts = TFanTotalPowerWatts

---@class EnergyMetric.CarbonEmissionsReducedKg
---@field CarbonEmissionsReducedKg number
local TCarbonEmissionsReducedKg = {}
TCarbonEmissionsReducedKg.__index = TCarbonEmissionsReducedKg
TCarbonEmissionsReducedKg.group = {}

local function TCarbonEmissionsReducedKg_from_obj(obj)
    return setmetatable(obj, TCarbonEmissionsReducedKg)
end

function TCarbonEmissionsReducedKg.new(CarbonEmissionsReducedKg)
    return TCarbonEmissionsReducedKg_from_obj({CarbonEmissionsReducedKg = CarbonEmissionsReducedKg})
end
---@param obj EnergyMetric.CarbonEmissionsReducedKg
function TCarbonEmissionsReducedKg:init_from_obj(obj)
    self.CarbonEmissionsReducedKg = obj.CarbonEmissionsReducedKg
end

function TCarbonEmissionsReducedKg:remove_error_props(errs, obj)
    utils.remove_obj_error_property(obj, errs, TCarbonEmissionsReducedKg.group)
end

TCarbonEmissionsReducedKg.from_obj = TCarbonEmissionsReducedKg_from_obj

TCarbonEmissionsReducedKg.proto_property = {'CarbonEmissionsReducedKg'}

TCarbonEmissionsReducedKg.default = {0}

TCarbonEmissionsReducedKg.struct = {{name = 'CarbonEmissionsReducedKg', is_array = false, struct = nil}}

function TCarbonEmissionsReducedKg:validate(prefix, errs, need_convert)
    prefix = prefix or ''

    validate.Optional(prefix .. 'CarbonEmissionsReducedKg', self.CarbonEmissionsReducedKg, 'double', true, errs,
        need_convert)

    TCarbonEmissionsReducedKg:remove_error_props(errs, self)
    validate.CheckUnknowProperty(self, TCarbonEmissionsReducedKg.proto_property, errs, need_convert)
    return self
end

function TCarbonEmissionsReducedKg:unpack(_)
    return self.CarbonEmissionsReducedKg
end

EnergyMetric.CarbonEmissionsReducedKg = TCarbonEmissionsReducedKg

---@class EnergyMetric.EnergySavedKwh
---@field EnergySavedKwh number
local TEnergySavedKwh = {}
TEnergySavedKwh.__index = TEnergySavedKwh
TEnergySavedKwh.group = {}

local function TEnergySavedKwh_from_obj(obj)
    return setmetatable(obj, TEnergySavedKwh)
end

function TEnergySavedKwh.new(EnergySavedKwh)
    return TEnergySavedKwh_from_obj({EnergySavedKwh = EnergySavedKwh})
end
---@param obj EnergyMetric.EnergySavedKwh
function TEnergySavedKwh:init_from_obj(obj)
    self.EnergySavedKwh = obj.EnergySavedKwh
end

function TEnergySavedKwh:remove_error_props(errs, obj)
    utils.remove_obj_error_property(obj, errs, TEnergySavedKwh.group)
end

TEnergySavedKwh.from_obj = TEnergySavedKwh_from_obj

TEnergySavedKwh.proto_property = {'EnergySavedKwh'}

TEnergySavedKwh.default = {0}

TEnergySavedKwh.struct = {{name = 'EnergySavedKwh', is_array = false, struct = nil}}

function TEnergySavedKwh:validate(prefix, errs, need_convert)
    prefix = prefix or ''

    validate.Optional(prefix .. 'EnergySavedKwh', self.EnergySavedKwh, 'double', true, errs, need_convert)

    TEnergySavedKwh:remove_error_props(errs, self)
    validate.CheckUnknowProperty(self, TEnergySavedKwh.proto_property, errs, need_convert)
    return self
end

function TEnergySavedKwh:unpack(_)
    return self.EnergySavedKwh
end

EnergyMetric.EnergySavedKwh = TEnergySavedKwh

---@class EnergyMetric.EnergySavedPercent
---@field EnergySavedPercent integer
local TEnergySavedPercent = {}
TEnergySavedPercent.__index = TEnergySavedPercent
TEnergySavedPercent.group = {}

local function TEnergySavedPercent_from_obj(obj)
    return setmetatable(obj, TEnergySavedPercent)
end

function TEnergySavedPercent.new(EnergySavedPercent)
    return TEnergySavedPercent_from_obj({EnergySavedPercent = EnergySavedPercent})
end
---@param obj EnergyMetric.EnergySavedPercent
function TEnergySavedPercent:init_from_obj(obj)
    self.EnergySavedPercent = obj.EnergySavedPercent
end

function TEnergySavedPercent:remove_error_props(errs, obj)
    utils.remove_obj_error_property(obj, errs, TEnergySavedPercent.group)
end

TEnergySavedPercent.from_obj = TEnergySavedPercent_from_obj

TEnergySavedPercent.proto_property = {'EnergySavedPercent'}

TEnergySavedPercent.default = {0}

TEnergySavedPercent.struct = {{name = 'EnergySavedPercent', is_array = false, struct = nil}}

function TEnergySavedPercent:validate(prefix, errs, need_convert)
    prefix = prefix or ''

    validate.Optional(prefix .. 'EnergySavedPercent', self.EnergySavedPercent, 'uint8', true, errs, need_convert)

    TEnergySavedPercent:remove_error_props(errs, self)
    validate.CheckUnknowProperty(self, TEnergySavedPercent.proto_property, errs, need_convert)
    return self
end

function TEnergySavedPercent:unpack(_)
    return self.EnergySavedPercent
end

EnergyMetric.EnergySavedPercent = TEnergySavedPercent

---@class EnergyMetric.HeatKcal
---@field HeatKcal integer
local THeatKcal = {}
THeatKcal.__index = THeatKcal
THeatKcal.group = {}

local function THeatKcal_from_obj(obj)
    return setmetatable(obj, THeatKcal)
end

function THeatKcal.new(HeatKcal)
    return THeatKcal_from_obj({HeatKcal = HeatKcal})
end
---@param obj EnergyMetric.HeatKcal
function THeatKcal:init_from_obj(obj)
    self.HeatKcal = obj.HeatKcal
end

function THeatKcal:remove_error_props(errs, obj)
    utils.remove_obj_error_property(obj, errs, THeatKcal.group)
end

THeatKcal.from_obj = THeatKcal_from_obj

THeatKcal.proto_property = {'HeatKcal'}

THeatKcal.default = {0}

THeatKcal.struct = {{name = 'HeatKcal', is_array = false, struct = nil}}

function THeatKcal:validate(prefix, errs, need_convert)
    prefix = prefix or ''

    validate.Optional(prefix .. 'HeatKcal', self.HeatKcal, 'uint32', true, errs, need_convert)

    THeatKcal:remove_error_props(errs, self)
    validate.CheckUnknowProperty(self, THeatKcal.proto_property, errs, need_convert)
    return self
end

function THeatKcal:unpack(_)
    return self.HeatKcal
end

EnergyMetric.HeatKcal = THeatKcal

---@class EnergyMetric.AverageConsumedWatts
---@field AverageConsumedWatts integer
local TAverageConsumedWatts = {}
TAverageConsumedWatts.__index = TAverageConsumedWatts
TAverageConsumedWatts.group = {}

local function TAverageConsumedWatts_from_obj(obj)
    return setmetatable(obj, TAverageConsumedWatts)
end

function TAverageConsumedWatts.new(AverageConsumedWatts)
    return TAverageConsumedWatts_from_obj({AverageConsumedWatts = AverageConsumedWatts})
end
---@param obj EnergyMetric.AverageConsumedWatts
function TAverageConsumedWatts:init_from_obj(obj)
    self.AverageConsumedWatts = obj.AverageConsumedWatts
end

function TAverageConsumedWatts:remove_error_props(errs, obj)
    utils.remove_obj_error_property(obj, errs, TAverageConsumedWatts.group)
end

TAverageConsumedWatts.from_obj = TAverageConsumedWatts_from_obj

TAverageConsumedWatts.proto_property = {'AverageConsumedWatts'}

TAverageConsumedWatts.default = {0}

TAverageConsumedWatts.struct = {{name = 'AverageConsumedWatts', is_array = false, struct = nil}}

function TAverageConsumedWatts:validate(prefix, errs, need_convert)
    prefix = prefix or ''

    validate.Optional(prefix .. 'AverageConsumedWatts', self.AverageConsumedWatts, 'uint32', true, errs, need_convert)

    TAverageConsumedWatts:remove_error_props(errs, self)
    validate.CheckUnknowProperty(self, TAverageConsumedWatts.proto_property, errs, need_convert)
    return self
end

function TAverageConsumedWatts:unpack(_)
    return self.AverageConsumedWatts
end

EnergyMetric.AverageConsumedWatts = TAverageConsumedWatts

---@class EnergyMetric.StatisticsCollectedTime
---@field StatisticsCollectedTime integer
local TStatisticsCollectedTime = {}
TStatisticsCollectedTime.__index = TStatisticsCollectedTime
TStatisticsCollectedTime.group = {}

local function TStatisticsCollectedTime_from_obj(obj)
    return setmetatable(obj, TStatisticsCollectedTime)
end

function TStatisticsCollectedTime.new(StatisticsCollectedTime)
    return TStatisticsCollectedTime_from_obj({StatisticsCollectedTime = StatisticsCollectedTime})
end
---@param obj EnergyMetric.StatisticsCollectedTime
function TStatisticsCollectedTime:init_from_obj(obj)
    self.StatisticsCollectedTime = obj.StatisticsCollectedTime
end

function TStatisticsCollectedTime:remove_error_props(errs, obj)
    utils.remove_obj_error_property(obj, errs, TStatisticsCollectedTime.group)
end

TStatisticsCollectedTime.from_obj = TStatisticsCollectedTime_from_obj

TStatisticsCollectedTime.proto_property = {'StatisticsCollectedTime'}

TStatisticsCollectedTime.default = {0}

TStatisticsCollectedTime.struct = {{name = 'StatisticsCollectedTime', is_array = false, struct = nil}}

function TStatisticsCollectedTime:validate(prefix, errs, need_convert)
    prefix = prefix or ''

    validate.Optional(prefix .. 'StatisticsCollectedTime', self.StatisticsCollectedTime, 'uint32', true, errs,
        need_convert)

    TStatisticsCollectedTime:remove_error_props(errs, self)
    validate.CheckUnknowProperty(self, TStatisticsCollectedTime.proto_property, errs, need_convert)
    return self
end

function TStatisticsCollectedTime:unpack(_)
    return self.StatisticsCollectedTime
end

EnergyMetric.StatisticsCollectedTime = TStatisticsCollectedTime

---@class EnergyMetric.MinConsumedWatts
---@field MinConsumedWatts integer
local TMinConsumedWatts = {}
TMinConsumedWatts.__index = TMinConsumedWatts
TMinConsumedWatts.group = {}

local function TMinConsumedWatts_from_obj(obj)
    return setmetatable(obj, TMinConsumedWatts)
end

function TMinConsumedWatts.new(MinConsumedWatts)
    return TMinConsumedWatts_from_obj({MinConsumedWatts = MinConsumedWatts})
end
---@param obj EnergyMetric.MinConsumedWatts
function TMinConsumedWatts:init_from_obj(obj)
    self.MinConsumedWatts = obj.MinConsumedWatts
end

function TMinConsumedWatts:remove_error_props(errs, obj)
    utils.remove_obj_error_property(obj, errs, TMinConsumedWatts.group)
end

TMinConsumedWatts.from_obj = TMinConsumedWatts_from_obj

TMinConsumedWatts.proto_property = {'MinConsumedWatts'}

TMinConsumedWatts.default = {0}

TMinConsumedWatts.struct = {{name = 'MinConsumedWatts', is_array = false, struct = nil}}

function TMinConsumedWatts:validate(prefix, errs, need_convert)
    prefix = prefix or ''

    validate.Optional(prefix .. 'MinConsumedWatts', self.MinConsumedWatts, 'uint32', true, errs, need_convert)

    TMinConsumedWatts:remove_error_props(errs, self)
    validate.CheckUnknowProperty(self, TMinConsumedWatts.proto_property, errs, need_convert)
    return self
end

function TMinConsumedWatts:unpack(_)
    return self.MinConsumedWatts
end

EnergyMetric.MinConsumedWatts = TMinConsumedWatts

---@class EnergyMetric.MaxConsumedOccurredTime
---@field MaxConsumedOccurredTime integer
local TMaxConsumedOccurredTime = {}
TMaxConsumedOccurredTime.__index = TMaxConsumedOccurredTime
TMaxConsumedOccurredTime.group = {}

local function TMaxConsumedOccurredTime_from_obj(obj)
    return setmetatable(obj, TMaxConsumedOccurredTime)
end

function TMaxConsumedOccurredTime.new(MaxConsumedOccurredTime)
    return TMaxConsumedOccurredTime_from_obj({MaxConsumedOccurredTime = MaxConsumedOccurredTime})
end
---@param obj EnergyMetric.MaxConsumedOccurredTime
function TMaxConsumedOccurredTime:init_from_obj(obj)
    self.MaxConsumedOccurredTime = obj.MaxConsumedOccurredTime
end

function TMaxConsumedOccurredTime:remove_error_props(errs, obj)
    utils.remove_obj_error_property(obj, errs, TMaxConsumedOccurredTime.group)
end

TMaxConsumedOccurredTime.from_obj = TMaxConsumedOccurredTime_from_obj

TMaxConsumedOccurredTime.proto_property = {'MaxConsumedOccurredTime'}

TMaxConsumedOccurredTime.default = {0}

TMaxConsumedOccurredTime.struct = {{name = 'MaxConsumedOccurredTime', is_array = false, struct = nil}}

function TMaxConsumedOccurredTime:validate(prefix, errs, need_convert)
    prefix = prefix or ''

    validate.Optional(prefix .. 'MaxConsumedOccurredTime', self.MaxConsumedOccurredTime, 'uint32', true, errs,
        need_convert)

    TMaxConsumedOccurredTime:remove_error_props(errs, self)
    validate.CheckUnknowProperty(self, TMaxConsumedOccurredTime.proto_property, errs, need_convert)
    return self
end

function TMaxConsumedOccurredTime:unpack(_)
    return self.MaxConsumedOccurredTime
end

EnergyMetric.MaxConsumedOccurredTime = TMaxConsumedOccurredTime

---@class EnergyMetric.MaxConsumedWatts
---@field MaxConsumedWatts integer
local TMaxConsumedWatts = {}
TMaxConsumedWatts.__index = TMaxConsumedWatts
TMaxConsumedWatts.group = {}

local function TMaxConsumedWatts_from_obj(obj)
    return setmetatable(obj, TMaxConsumedWatts)
end

function TMaxConsumedWatts.new(MaxConsumedWatts)
    return TMaxConsumedWatts_from_obj({MaxConsumedWatts = MaxConsumedWatts})
end
---@param obj EnergyMetric.MaxConsumedWatts
function TMaxConsumedWatts:init_from_obj(obj)
    self.MaxConsumedWatts = obj.MaxConsumedWatts
end

function TMaxConsumedWatts:remove_error_props(errs, obj)
    utils.remove_obj_error_property(obj, errs, TMaxConsumedWatts.group)
end

TMaxConsumedWatts.from_obj = TMaxConsumedWatts_from_obj

TMaxConsumedWatts.proto_property = {'MaxConsumedWatts'}

TMaxConsumedWatts.default = {0}

TMaxConsumedWatts.struct = {{name = 'MaxConsumedWatts', is_array = false, struct = nil}}

function TMaxConsumedWatts:validate(prefix, errs, need_convert)
    prefix = prefix or ''

    validate.Optional(prefix .. 'MaxConsumedWatts', self.MaxConsumedWatts, 'uint32', true, errs, need_convert)

    TMaxConsumedWatts:remove_error_props(errs, self)
    validate.CheckUnknowProperty(self, TMaxConsumedWatts.proto_property, errs, need_convert)
    return self
end

function TMaxConsumedWatts:unpack(_)
    return self.MaxConsumedWatts
end

EnergyMetric.MaxConsumedWatts = TMaxConsumedWatts

---@class EnergyMetric.PowerConsumption
---@field PowerConsumption number
local TPowerConsumption = {}
TPowerConsumption.__index = TPowerConsumption
TPowerConsumption.group = {}

local function TPowerConsumption_from_obj(obj)
    return setmetatable(obj, TPowerConsumption)
end

function TPowerConsumption.new(PowerConsumption)
    return TPowerConsumption_from_obj({PowerConsumption = PowerConsumption})
end
---@param obj EnergyMetric.PowerConsumption
function TPowerConsumption:init_from_obj(obj)
    self.PowerConsumption = obj.PowerConsumption
end

function TPowerConsumption:remove_error_props(errs, obj)
    utils.remove_obj_error_property(obj, errs, TPowerConsumption.group)
end

TPowerConsumption.from_obj = TPowerConsumption_from_obj

TPowerConsumption.proto_property = {'PowerConsumption'}

TPowerConsumption.default = {0}

TPowerConsumption.struct = {{name = 'PowerConsumption', is_array = false, struct = nil}}

function TPowerConsumption:validate(prefix, errs, need_convert)
    prefix = prefix or ''

    validate.Optional(prefix .. 'PowerConsumption', self.PowerConsumption, 'double', true, errs, need_convert)

    TPowerConsumption:remove_error_props(errs, self)
    validate.CheckUnknowProperty(self, TPowerConsumption.proto_property, errs, need_convert)
    return self
end

function TPowerConsumption:unpack(_)
    return self.PowerConsumption
end

EnergyMetric.PowerConsumption = TPowerConsumption

---@class EnergyMetric.HighPowerThresholdWatts
---@field HighPowerThresholdWatts number
local THighPowerThresholdWatts = {}
THighPowerThresholdWatts.__index = THighPowerThresholdWatts
THighPowerThresholdWatts.group = {}

local function THighPowerThresholdWatts_from_obj(obj)
    return setmetatable(obj, THighPowerThresholdWatts)
end

function THighPowerThresholdWatts.new(HighPowerThresholdWatts)
    return THighPowerThresholdWatts_from_obj({HighPowerThresholdWatts = HighPowerThresholdWatts})
end
---@param obj EnergyMetric.HighPowerThresholdWatts
function THighPowerThresholdWatts:init_from_obj(obj)
    self.HighPowerThresholdWatts = obj.HighPowerThresholdWatts
end

function THighPowerThresholdWatts:remove_error_props(errs, obj)
    utils.remove_obj_error_property(obj, errs, THighPowerThresholdWatts.group)
end

THighPowerThresholdWatts.from_obj = THighPowerThresholdWatts_from_obj

THighPowerThresholdWatts.proto_property = {'HighPowerThresholdWatts'}

THighPowerThresholdWatts.default = {0}

THighPowerThresholdWatts.struct = {{name = 'HighPowerThresholdWatts', is_array = false, struct = nil}}

function THighPowerThresholdWatts:validate(prefix, errs, need_convert)
    prefix = prefix or ''

    validate.Optional(prefix .. 'HighPowerThresholdWatts', self.HighPowerThresholdWatts, 'double', true, errs,
        need_convert)

    THighPowerThresholdWatts:remove_error_props(errs, self)
    validate.CheckUnknowProperty(self, THighPowerThresholdWatts.proto_property, errs, need_convert)
    return self
end

function THighPowerThresholdWatts:unpack(_)
    return self.HighPowerThresholdWatts
end

EnergyMetric.HighPowerThresholdWatts = THighPowerThresholdWatts

---@class EnergyMetric.SystemOutputPower
---@field SystemOutputPower integer
local TSystemOutputPower = {}
TSystemOutputPower.__index = TSystemOutputPower
TSystemOutputPower.group = {}

local function TSystemOutputPower_from_obj(obj)
    return setmetatable(obj, TSystemOutputPower)
end

function TSystemOutputPower.new(SystemOutputPower)
    return TSystemOutputPower_from_obj({SystemOutputPower = SystemOutputPower})
end
---@param obj EnergyMetric.SystemOutputPower
function TSystemOutputPower:init_from_obj(obj)
    self.SystemOutputPower = obj.SystemOutputPower
end

function TSystemOutputPower:remove_error_props(errs, obj)
    utils.remove_obj_error_property(obj, errs, TSystemOutputPower.group)
end

TSystemOutputPower.from_obj = TSystemOutputPower_from_obj

TSystemOutputPower.proto_property = {'SystemOutputPower'}

TSystemOutputPower.default = {0}

TSystemOutputPower.struct = {{name = 'SystemOutputPower', is_array = false, struct = nil}}

function TSystemOutputPower:validate(prefix, errs, need_convert)
    prefix = prefix or ''

    validate.Optional(prefix .. 'SystemOutputPower', self.SystemOutputPower, 'uint32', true, errs, need_convert)

    TSystemOutputPower:remove_error_props(errs, self)
    validate.CheckUnknowProperty(self, TSystemOutputPower.proto_property, errs, need_convert)
    return self
end

function TSystemOutputPower:unpack(_)
    return self.SystemOutputPower
end

EnergyMetric.SystemOutputPower = TSystemOutputPower

---@class EnergyMetric.SystemPower
---@field SystemPower integer
local TSystemPower = {}
TSystemPower.__index = TSystemPower
TSystemPower.group = {}

local function TSystemPower_from_obj(obj)
    return setmetatable(obj, TSystemPower)
end

function TSystemPower.new(SystemPower)
    return TSystemPower_from_obj({SystemPower = SystemPower})
end
---@param obj EnergyMetric.SystemPower
function TSystemPower:init_from_obj(obj)
    self.SystemPower = obj.SystemPower
end

function TSystemPower:remove_error_props(errs, obj)
    utils.remove_obj_error_property(obj, errs, TSystemPower.group)
end

TSystemPower.from_obj = TSystemPower_from_obj

TSystemPower.proto_property = {'SystemPower'}

TSystemPower.default = {0}

TSystemPower.struct = {{name = 'SystemPower', is_array = false, struct = nil}}

function TSystemPower:validate(prefix, errs, need_convert)
    prefix = prefix or ''

    validate.Optional(prefix .. 'SystemPower', self.SystemPower, 'uint32', true, errs, need_convert)

    TSystemPower:remove_error_props(errs, self)
    validate.CheckUnknowProperty(self, TSystemPower.proto_property, errs, need_convert)
    return self
end

function TSystemPower:unpack(_)
    return self.SystemPower
end

EnergyMetric.SystemPower = TSystemPower

---@class EnergyMetric.GetPredictedPowerSavedDataRsp
---@field PredictedPowerSavedData EnergyMetric.PredictedPowerSavedDataItem[]
local TGetPredictedPowerSavedDataRsp = {}
TGetPredictedPowerSavedDataRsp.__index = TGetPredictedPowerSavedDataRsp
TGetPredictedPowerSavedDataRsp.group = {}

local function TGetPredictedPowerSavedDataRsp_from_obj(obj)
    obj.PredictedPowerSavedData = utils.from_obj(EnergyMetric.PredictedPowerSavedDataItem, obj.PredictedPowerSavedData,
        true)
    return setmetatable(obj, TGetPredictedPowerSavedDataRsp)
end

function TGetPredictedPowerSavedDataRsp.new(PredictedPowerSavedData)
    return TGetPredictedPowerSavedDataRsp_from_obj({PredictedPowerSavedData = PredictedPowerSavedData})
end
---@param obj EnergyMetric.GetPredictedPowerSavedDataRsp
function TGetPredictedPowerSavedDataRsp:init_from_obj(obj)
    self.PredictedPowerSavedData = obj.PredictedPowerSavedData
end

function TGetPredictedPowerSavedDataRsp:remove_error_props(errs, obj)
    utils.remove_obj_error_property(obj, errs, TGetPredictedPowerSavedDataRsp.group)
end

TGetPredictedPowerSavedDataRsp.from_obj = TGetPredictedPowerSavedDataRsp_from_obj

TGetPredictedPowerSavedDataRsp.proto_property = {'PredictedPowerSavedData'}

TGetPredictedPowerSavedDataRsp.default = {{}}

TGetPredictedPowerSavedDataRsp.struct = {
    {name = 'PredictedPowerSavedData', is_array = true, struct = EnergyMetric.PredictedPowerSavedDataItem.struct}
}

function TGetPredictedPowerSavedDataRsp:validate(prefix, errs, need_convert)
    prefix = prefix or ''

    for _, v in pairs(self.PredictedPowerSavedData) do
        EnergyMetric.PredictedPowerSavedDataItem.new(v.Time, v.PredictedPowerSavedWatts):validate(prefix, errs,
            need_convert)
    end

    TGetPredictedPowerSavedDataRsp:remove_error_props(errs, self)
    validate.CheckUnknowProperty(self, TGetPredictedPowerSavedDataRsp.proto_property, errs, need_convert)
    return self
end

function TGetPredictedPowerSavedDataRsp:unpack(raw)
    return utils.unpack(raw, self.PredictedPowerSavedData, true)
end

EnergyMetric.GetPredictedPowerSavedDataRsp = TGetPredictedPowerSavedDataRsp

---@class EnergyMetric.GetPredictedPowerSavedDataReq
local TGetPredictedPowerSavedDataReq = {}
TGetPredictedPowerSavedDataReq.__index = TGetPredictedPowerSavedDataReq
TGetPredictedPowerSavedDataReq.group = {}

local function TGetPredictedPowerSavedDataReq_from_obj(obj)
    return setmetatable(obj, TGetPredictedPowerSavedDataReq)
end

function TGetPredictedPowerSavedDataReq.new()
    return TGetPredictedPowerSavedDataReq_from_obj({})
end
---@param obj EnergyMetric.GetPredictedPowerSavedDataReq
function TGetPredictedPowerSavedDataReq:init_from_obj(obj)

end

function TGetPredictedPowerSavedDataReq:remove_error_props(errs, obj)
    utils.remove_obj_error_property(obj, errs, TGetPredictedPowerSavedDataReq.group)
end

TGetPredictedPowerSavedDataReq.from_obj = TGetPredictedPowerSavedDataReq_from_obj

TGetPredictedPowerSavedDataReq.proto_property = {}

TGetPredictedPowerSavedDataReq.default = {}

TGetPredictedPowerSavedDataReq.struct = {}

function TGetPredictedPowerSavedDataReq:validate(prefix, errs, need_convert)
    prefix = prefix or ''

    TGetPredictedPowerSavedDataReq:remove_error_props(errs, self)
    validate.CheckUnknowProperty(self, TGetPredictedPowerSavedDataReq.proto_property, errs, need_convert)
    return self
end

function TGetPredictedPowerSavedDataReq:unpack(_)
end

EnergyMetric.GetPredictedPowerSavedDataReq = TGetPredictedPowerSavedDataReq

---@class EnergyMetric.GetPredictedPowerDataRsp
---@field PredictedPowerData EnergyMetric.PredictedPowerDataItem[]
local TGetPredictedPowerDataRsp = {}
TGetPredictedPowerDataRsp.__index = TGetPredictedPowerDataRsp
TGetPredictedPowerDataRsp.group = {}

local function TGetPredictedPowerDataRsp_from_obj(obj)
    obj.PredictedPowerData = utils.from_obj(EnergyMetric.PredictedPowerDataItem, obj.PredictedPowerData, true)
    return setmetatable(obj, TGetPredictedPowerDataRsp)
end

function TGetPredictedPowerDataRsp.new(PredictedPowerData)
    return TGetPredictedPowerDataRsp_from_obj({PredictedPowerData = PredictedPowerData})
end
---@param obj EnergyMetric.GetPredictedPowerDataRsp
function TGetPredictedPowerDataRsp:init_from_obj(obj)
    self.PredictedPowerData = obj.PredictedPowerData
end

function TGetPredictedPowerDataRsp:remove_error_props(errs, obj)
    utils.remove_obj_error_property(obj, errs, TGetPredictedPowerDataRsp.group)
end

TGetPredictedPowerDataRsp.from_obj = TGetPredictedPowerDataRsp_from_obj

TGetPredictedPowerDataRsp.proto_property = {'PredictedPowerData'}

TGetPredictedPowerDataRsp.default = {{}}

TGetPredictedPowerDataRsp.struct = {
    {name = 'PredictedPowerData', is_array = true, struct = EnergyMetric.PredictedPowerDataItem.struct}
}

function TGetPredictedPowerDataRsp:validate(prefix, errs, need_convert)
    prefix = prefix or ''

    for _, v in pairs(self.PredictedPowerData) do
        EnergyMetric.PredictedPowerDataItem.new(v.Time, v.PredictedPowerWatts):validate(prefix, errs, need_convert)
    end

    TGetPredictedPowerDataRsp:remove_error_props(errs, self)
    validate.CheckUnknowProperty(self, TGetPredictedPowerDataRsp.proto_property, errs, need_convert)
    return self
end

function TGetPredictedPowerDataRsp:unpack(raw)
    return utils.unpack(raw, self.PredictedPowerData, true)
end

EnergyMetric.GetPredictedPowerDataRsp = TGetPredictedPowerDataRsp

---@class EnergyMetric.GetPredictedPowerDataReq
local TGetPredictedPowerDataReq = {}
TGetPredictedPowerDataReq.__index = TGetPredictedPowerDataReq
TGetPredictedPowerDataReq.group = {}

local function TGetPredictedPowerDataReq_from_obj(obj)
    return setmetatable(obj, TGetPredictedPowerDataReq)
end

function TGetPredictedPowerDataReq.new()
    return TGetPredictedPowerDataReq_from_obj({})
end
---@param obj EnergyMetric.GetPredictedPowerDataReq
function TGetPredictedPowerDataReq:init_from_obj(obj)

end

function TGetPredictedPowerDataReq:remove_error_props(errs, obj)
    utils.remove_obj_error_property(obj, errs, TGetPredictedPowerDataReq.group)
end

TGetPredictedPowerDataReq.from_obj = TGetPredictedPowerDataReq_from_obj

TGetPredictedPowerDataReq.proto_property = {}

TGetPredictedPowerDataReq.default = {}

TGetPredictedPowerDataReq.struct = {}

function TGetPredictedPowerDataReq:validate(prefix, errs, need_convert)
    prefix = prefix or ''

    TGetPredictedPowerDataReq:remove_error_props(errs, self)
    validate.CheckUnknowProperty(self, TGetPredictedPowerDataReq.proto_property, errs, need_convert)
    return self
end

function TGetPredictedPowerDataReq:unpack(_)
end

EnergyMetric.GetPredictedPowerDataReq = TGetPredictedPowerDataReq

---@class EnergyMetric.SetHighPowerThresholdWattsRsp
local TSetHighPowerThresholdWattsRsp = {}
TSetHighPowerThresholdWattsRsp.__index = TSetHighPowerThresholdWattsRsp
TSetHighPowerThresholdWattsRsp.group = {}

local function TSetHighPowerThresholdWattsRsp_from_obj(obj)
    return setmetatable(obj, TSetHighPowerThresholdWattsRsp)
end

function TSetHighPowerThresholdWattsRsp.new()
    return TSetHighPowerThresholdWattsRsp_from_obj({})
end
---@param obj EnergyMetric.SetHighPowerThresholdWattsRsp
function TSetHighPowerThresholdWattsRsp:init_from_obj(obj)

end

function TSetHighPowerThresholdWattsRsp:remove_error_props(errs, obj)
    utils.remove_obj_error_property(obj, errs, TSetHighPowerThresholdWattsRsp.group)
end

TSetHighPowerThresholdWattsRsp.from_obj = TSetHighPowerThresholdWattsRsp_from_obj

TSetHighPowerThresholdWattsRsp.proto_property = {}

TSetHighPowerThresholdWattsRsp.default = {}

TSetHighPowerThresholdWattsRsp.struct = {}

function TSetHighPowerThresholdWattsRsp:validate(prefix, errs, need_convert)
    prefix = prefix or ''

    TSetHighPowerThresholdWattsRsp:remove_error_props(errs, self)
    validate.CheckUnknowProperty(self, TSetHighPowerThresholdWattsRsp.proto_property, errs, need_convert)
    return self
end

function TSetHighPowerThresholdWattsRsp:unpack(_)
end

EnergyMetric.SetHighPowerThresholdWattsRsp = TSetHighPowerThresholdWattsRsp

---@class EnergyMetric.SetHighPowerThresholdWattsReq
---@field HighPowerThresholdWatts number
local TSetHighPowerThresholdWattsReq = {}
TSetHighPowerThresholdWattsReq.__index = TSetHighPowerThresholdWattsReq
TSetHighPowerThresholdWattsReq.group = {}

local function TSetHighPowerThresholdWattsReq_from_obj(obj)
    return setmetatable(obj, TSetHighPowerThresholdWattsReq)
end

function TSetHighPowerThresholdWattsReq.new(HighPowerThresholdWatts)
    return TSetHighPowerThresholdWattsReq_from_obj({HighPowerThresholdWatts = HighPowerThresholdWatts})
end
---@param obj EnergyMetric.SetHighPowerThresholdWattsReq
function TSetHighPowerThresholdWattsReq:init_from_obj(obj)
    self.HighPowerThresholdWatts = obj.HighPowerThresholdWatts
end

function TSetHighPowerThresholdWattsReq:remove_error_props(errs, obj)
    utils.remove_obj_error_property(obj, errs, TSetHighPowerThresholdWattsReq.group)
end

TSetHighPowerThresholdWattsReq.from_obj = TSetHighPowerThresholdWattsReq_from_obj

TSetHighPowerThresholdWattsReq.proto_property = {'HighPowerThresholdWatts'}

TSetHighPowerThresholdWattsReq.default = {0}

TSetHighPowerThresholdWattsReq.struct = {{name = 'HighPowerThresholdWatts', is_array = false, struct = nil}}

function TSetHighPowerThresholdWattsReq:validate(prefix, errs, need_convert)
    prefix = prefix or ''

    validate.Optional(prefix .. 'HighPowerThresholdWatts', self.HighPowerThresholdWatts, 'double', false, errs,
        need_convert)

    TSetHighPowerThresholdWattsReq:remove_error_props(errs, self)
    validate.CheckUnknowProperty(self, TSetHighPowerThresholdWattsReq.proto_property, errs, need_convert)
    return self
end

function TSetHighPowerThresholdWattsReq:unpack(_)
    return self.HighPowerThresholdWatts
end

EnergyMetric.SetHighPowerThresholdWattsReq = TSetHighPowerThresholdWattsReq

---@class EnergyMetric.GetPowerHistoryDataRsp
---@field PowerHistoryData EnergyMetric.PowerHistoryDataItem[]
local TGetPowerHistoryDataRsp = {}
TGetPowerHistoryDataRsp.__index = TGetPowerHistoryDataRsp
TGetPowerHistoryDataRsp.group = {}

local function TGetPowerHistoryDataRsp_from_obj(obj)
    obj.PowerHistoryData = utils.from_obj(EnergyMetric.PowerHistoryDataItem, obj.PowerHistoryData, true)
    return setmetatable(obj, TGetPowerHistoryDataRsp)
end

function TGetPowerHistoryDataRsp.new(PowerHistoryData)
    return TGetPowerHistoryDataRsp_from_obj({PowerHistoryData = PowerHistoryData})
end
---@param obj EnergyMetric.GetPowerHistoryDataRsp
function TGetPowerHistoryDataRsp:init_from_obj(obj)
    self.PowerHistoryData = obj.PowerHistoryData
end

function TGetPowerHistoryDataRsp:remove_error_props(errs, obj)
    utils.remove_obj_error_property(obj, errs, TGetPowerHistoryDataRsp.group)
end

TGetPowerHistoryDataRsp.from_obj = TGetPowerHistoryDataRsp_from_obj

TGetPowerHistoryDataRsp.proto_property = {'PowerHistoryData'}

TGetPowerHistoryDataRsp.default = {{}}

TGetPowerHistoryDataRsp.struct = {
    {name = 'PowerHistoryData', is_array = true, struct = EnergyMetric.PowerHistoryDataItem.struct}
}

function TGetPowerHistoryDataRsp:validate(prefix, errs, need_convert)
    prefix = prefix or ''

    for _, v in pairs(self.PowerHistoryData) do
        EnergyMetric.PowerHistoryDataItem.new(v.Time, v.PowerWatts, v.PowerAverageWatts, v.PowerPeakWatts):validate(
            prefix, errs, need_convert)
    end

    TGetPowerHistoryDataRsp:remove_error_props(errs, self)
    validate.CheckUnknowProperty(self, TGetPowerHistoryDataRsp.proto_property, errs, need_convert)
    return self
end

function TGetPowerHistoryDataRsp:unpack(raw)
    return utils.unpack(raw, self.PowerHistoryData, true)
end

EnergyMetric.GetPowerHistoryDataRsp = TGetPowerHistoryDataRsp

---@class EnergyMetric.GetPowerHistoryDataReq
---@field Domain string
---@field DomainId integer
local TGetPowerHistoryDataReq = {}
TGetPowerHistoryDataReq.__index = TGetPowerHistoryDataReq
TGetPowerHistoryDataReq.group = {}

local function TGetPowerHistoryDataReq_from_obj(obj)
    return setmetatable(obj, TGetPowerHistoryDataReq)
end

function TGetPowerHistoryDataReq.new(Domain, DomainId)
    return TGetPowerHistoryDataReq_from_obj({Domain = Domain, DomainId = DomainId})
end
---@param obj EnergyMetric.GetPowerHistoryDataReq
function TGetPowerHistoryDataReq:init_from_obj(obj)
    self.Domain = obj.Domain
    self.DomainId = obj.DomainId
end

function TGetPowerHistoryDataReq:remove_error_props(errs, obj)
    utils.remove_obj_error_property(obj, errs, TGetPowerHistoryDataReq.group)
end

TGetPowerHistoryDataReq.from_obj = TGetPowerHistoryDataReq_from_obj

TGetPowerHistoryDataReq.proto_property = {'Domain', 'DomainId'}

TGetPowerHistoryDataReq.default = {'', 0}

TGetPowerHistoryDataReq.struct = {
    {name = 'Domain', is_array = false, struct = nil}, {name = 'DomainId', is_array = false, struct = nil}
}

function TGetPowerHistoryDataReq:validate(prefix, errs, need_convert)
    prefix = prefix or ''

    validate.Optional(prefix .. 'Domain', self.Domain, 'string', false, errs, need_convert)
    validate.Optional(prefix .. 'DomainId', self.DomainId, 'uint32', false, errs, need_convert)

    if self.Domain ~= nil then
        validate.Enum(prefix .. 'Domain', self.Domain, '', {'System', 'Fan', 'Cpu', 'Memory', 'PSUInput', 'PSUOutput'},
            errs, need_convert)
    end

    TGetPowerHistoryDataReq:remove_error_props(errs, self)
    validate.CheckUnknowProperty(self, TGetPowerHistoryDataReq.proto_property, errs, need_convert)
    return self
end

function TGetPowerHistoryDataReq:unpack(_)
    return self.Domain, self.DomainId
end

EnergyMetric.GetPowerHistoryDataReq = TGetPowerHistoryDataReq

---@class EnergyMetric.ResetPowerHistoryDataRsp
local TResetPowerHistoryDataRsp = {}
TResetPowerHistoryDataRsp.__index = TResetPowerHistoryDataRsp
TResetPowerHistoryDataRsp.group = {}

local function TResetPowerHistoryDataRsp_from_obj(obj)
    return setmetatable(obj, TResetPowerHistoryDataRsp)
end

function TResetPowerHistoryDataRsp.new()
    return TResetPowerHistoryDataRsp_from_obj({})
end
---@param obj EnergyMetric.ResetPowerHistoryDataRsp
function TResetPowerHistoryDataRsp:init_from_obj(obj)

end

function TResetPowerHistoryDataRsp:remove_error_props(errs, obj)
    utils.remove_obj_error_property(obj, errs, TResetPowerHistoryDataRsp.group)
end

TResetPowerHistoryDataRsp.from_obj = TResetPowerHistoryDataRsp_from_obj

TResetPowerHistoryDataRsp.proto_property = {}

TResetPowerHistoryDataRsp.default = {}

TResetPowerHistoryDataRsp.struct = {}

function TResetPowerHistoryDataRsp:validate(prefix, errs, need_convert)
    prefix = prefix or ''

    TResetPowerHistoryDataRsp:remove_error_props(errs, self)
    validate.CheckUnknowProperty(self, TResetPowerHistoryDataRsp.proto_property, errs, need_convert)
    return self
end

function TResetPowerHistoryDataRsp:unpack(_)
end

EnergyMetric.ResetPowerHistoryDataRsp = TResetPowerHistoryDataRsp

---@class EnergyMetric.ResetPowerHistoryDataReq
---@field Domain string
---@field DomainId integer
local TResetPowerHistoryDataReq = {}
TResetPowerHistoryDataReq.__index = TResetPowerHistoryDataReq
TResetPowerHistoryDataReq.group = {}

local function TResetPowerHistoryDataReq_from_obj(obj)
    return setmetatable(obj, TResetPowerHistoryDataReq)
end

function TResetPowerHistoryDataReq.new(Domain, DomainId)
    return TResetPowerHistoryDataReq_from_obj({Domain = Domain, DomainId = DomainId})
end
---@param obj EnergyMetric.ResetPowerHistoryDataReq
function TResetPowerHistoryDataReq:init_from_obj(obj)
    self.Domain = obj.Domain
    self.DomainId = obj.DomainId
end

function TResetPowerHistoryDataReq:remove_error_props(errs, obj)
    utils.remove_obj_error_property(obj, errs, TResetPowerHistoryDataReq.group)
end

TResetPowerHistoryDataReq.from_obj = TResetPowerHistoryDataReq_from_obj

TResetPowerHistoryDataReq.proto_property = {'Domain', 'DomainId'}

TResetPowerHistoryDataReq.default = {'', 0}

TResetPowerHistoryDataReq.struct = {
    {name = 'Domain', is_array = false, struct = nil}, {name = 'DomainId', is_array = false, struct = nil}
}

function TResetPowerHistoryDataReq:validate(prefix, errs, need_convert)
    prefix = prefix or ''

    validate.Optional(prefix .. 'Domain', self.Domain, 'string', false, errs, need_convert)
    validate.Optional(prefix .. 'DomainId', self.DomainId, 'uint32', false, errs, need_convert)

    if self.Domain ~= nil then
        validate.Enum(prefix .. 'Domain', self.Domain, '', {'System', 'Fan', 'Cpu', 'Memory', 'PSUInput', 'PSUOutput'},
            errs, need_convert)
    end

    TResetPowerHistoryDataReq:remove_error_props(errs, self)
    validate.CheckUnknowProperty(self, TResetPowerHistoryDataReq.proto_property, errs, need_convert)
    return self
end

function TResetPowerHistoryDataReq:unpack(_)
    return self.Domain, self.DomainId
end

EnergyMetric.ResetPowerHistoryDataReq = TResetPowerHistoryDataReq

---@class EnergyMetric.CollectPowerHistoryDataRsp
---@field TaskId integer
local TCollectPowerHistoryDataRsp = {}
TCollectPowerHistoryDataRsp.__index = TCollectPowerHistoryDataRsp
TCollectPowerHistoryDataRsp.group = {}

local function TCollectPowerHistoryDataRsp_from_obj(obj)
    return setmetatable(obj, TCollectPowerHistoryDataRsp)
end

function TCollectPowerHistoryDataRsp.new(TaskId)
    return TCollectPowerHistoryDataRsp_from_obj({TaskId = TaskId})
end
---@param obj EnergyMetric.CollectPowerHistoryDataRsp
function TCollectPowerHistoryDataRsp:init_from_obj(obj)
    self.TaskId = obj.TaskId
end

function TCollectPowerHistoryDataRsp:remove_error_props(errs, obj)
    utils.remove_obj_error_property(obj, errs, TCollectPowerHistoryDataRsp.group)
end

TCollectPowerHistoryDataRsp.from_obj = TCollectPowerHistoryDataRsp_from_obj

TCollectPowerHistoryDataRsp.proto_property = {'TaskId'}

TCollectPowerHistoryDataRsp.default = {0}

TCollectPowerHistoryDataRsp.struct = {{name = 'TaskId', is_array = false, struct = nil}}

function TCollectPowerHistoryDataRsp:validate(prefix, errs, need_convert)
    prefix = prefix or ''

    validate.Optional(prefix .. 'TaskId', self.TaskId, 'uint32', false, errs, need_convert)

    TCollectPowerHistoryDataRsp:remove_error_props(errs, self)
    validate.CheckUnknowProperty(self, TCollectPowerHistoryDataRsp.proto_property, errs, need_convert)
    return self
end

function TCollectPowerHistoryDataRsp:unpack(_)
    return self.TaskId
end

EnergyMetric.CollectPowerHistoryDataRsp = TCollectPowerHistoryDataRsp

---@class EnergyMetric.CollectPowerHistoryDataReq
---@field FilePath string
---@field Domain string
---@field DomainId integer
local TCollectPowerHistoryDataReq = {}
TCollectPowerHistoryDataReq.__index = TCollectPowerHistoryDataReq
TCollectPowerHistoryDataReq.group = {}

local function TCollectPowerHistoryDataReq_from_obj(obj)
    return setmetatable(obj, TCollectPowerHistoryDataReq)
end

function TCollectPowerHistoryDataReq.new(FilePath, Domain, DomainId)
    return TCollectPowerHistoryDataReq_from_obj({FilePath = FilePath, Domain = Domain, DomainId = DomainId})
end
---@param obj EnergyMetric.CollectPowerHistoryDataReq
function TCollectPowerHistoryDataReq:init_from_obj(obj)
    self.FilePath = obj.FilePath
    self.Domain = obj.Domain
    self.DomainId = obj.DomainId
end

function TCollectPowerHistoryDataReq:remove_error_props(errs, obj)
    utils.remove_obj_error_property(obj, errs, TCollectPowerHistoryDataReq.group)
end

TCollectPowerHistoryDataReq.from_obj = TCollectPowerHistoryDataReq_from_obj

TCollectPowerHistoryDataReq.proto_property = {'FilePath', 'Domain', 'DomainId'}

TCollectPowerHistoryDataReq.default = {'', '', 0}

TCollectPowerHistoryDataReq.struct = {
    {name = 'FilePath', is_array = false, struct = nil}, {name = 'Domain', is_array = false, struct = nil},
    {name = 'DomainId', is_array = false, struct = nil}
}

function TCollectPowerHistoryDataReq:validate(prefix, errs, need_convert)
    prefix = prefix or ''

    validate.Optional(prefix .. 'FilePath', self.FilePath, 'string', false, errs, need_convert)
    validate.Optional(prefix .. 'Domain', self.Domain, 'string', false, errs, need_convert)
    validate.Optional(prefix .. 'DomainId', self.DomainId, 'uint32', false, errs, need_convert)

    if self.Domain ~= nil then
        validate.Enum(prefix .. 'Domain', self.Domain, '', {'System', 'Fan', 'Cpu', 'Memory', 'PSUInput', 'PSUOutput'},
            errs, need_convert)
    end

    TCollectPowerHistoryDataReq:remove_error_props(errs, self)
    validate.CheckUnknowProperty(self, TCollectPowerHistoryDataReq.proto_property, errs, need_convert)
    return self
end

function TCollectPowerHistoryDataReq:unpack(_)
    return self.FilePath, self.Domain, self.DomainId
end

EnergyMetric.CollectPowerHistoryDataReq = TCollectPowerHistoryDataReq

---@class EnergyMetric.PowerResetStatisticsRsp
local TPowerResetStatisticsRsp = {}
TPowerResetStatisticsRsp.__index = TPowerResetStatisticsRsp
TPowerResetStatisticsRsp.group = {}

local function TPowerResetStatisticsRsp_from_obj(obj)
    return setmetatable(obj, TPowerResetStatisticsRsp)
end

function TPowerResetStatisticsRsp.new()
    return TPowerResetStatisticsRsp_from_obj({})
end
---@param obj EnergyMetric.PowerResetStatisticsRsp
function TPowerResetStatisticsRsp:init_from_obj(obj)

end

function TPowerResetStatisticsRsp:remove_error_props(errs, obj)
    utils.remove_obj_error_property(obj, errs, TPowerResetStatisticsRsp.group)
end

TPowerResetStatisticsRsp.from_obj = TPowerResetStatisticsRsp_from_obj

TPowerResetStatisticsRsp.proto_property = {}

TPowerResetStatisticsRsp.default = {}

TPowerResetStatisticsRsp.struct = {}

function TPowerResetStatisticsRsp:validate(prefix, errs, need_convert)
    prefix = prefix or ''

    TPowerResetStatisticsRsp:remove_error_props(errs, self)
    validate.CheckUnknowProperty(self, TPowerResetStatisticsRsp.proto_property, errs, need_convert)
    return self
end

function TPowerResetStatisticsRsp:unpack(_)
end

EnergyMetric.PowerResetStatisticsRsp = TPowerResetStatisticsRsp

---@class EnergyMetric.PowerResetStatisticsReq
local TPowerResetStatisticsReq = {}
TPowerResetStatisticsReq.__index = TPowerResetStatisticsReq
TPowerResetStatisticsReq.group = {}

local function TPowerResetStatisticsReq_from_obj(obj)
    return setmetatable(obj, TPowerResetStatisticsReq)
end

function TPowerResetStatisticsReq.new()
    return TPowerResetStatisticsReq_from_obj({})
end
---@param obj EnergyMetric.PowerResetStatisticsReq
function TPowerResetStatisticsReq:init_from_obj(obj)

end

function TPowerResetStatisticsReq:remove_error_props(errs, obj)
    utils.remove_obj_error_property(obj, errs, TPowerResetStatisticsReq.group)
end

TPowerResetStatisticsReq.from_obj = TPowerResetStatisticsReq_from_obj

TPowerResetStatisticsReq.proto_property = {}

TPowerResetStatisticsReq.default = {}

TPowerResetStatisticsReq.struct = {}

function TPowerResetStatisticsReq:validate(prefix, errs, need_convert)
    prefix = prefix or ''

    TPowerResetStatisticsReq:remove_error_props(errs, self)
    validate.CheckUnknowProperty(self, TPowerResetStatisticsReq.proto_property, errs, need_convert)
    return self
end

function TPowerResetStatisticsReq:unpack(_)
end

EnergyMetric.PowerResetStatisticsReq = TPowerResetStatisticsReq

EnergyMetric.interface = mdb.register_interface('bmc.kepler.Systems.EnergyMetric', {
    SystemPower = {'u', {'EMIT_CHANGE'}, true, nil, false},
    SystemOutputPower = {'u', {}, true, nil, false},
    HighPowerThresholdWatts = {'d', {'EMIT_CHANGE'}, true, nil, false},
    PowerConsumption = {'d', {}, true, nil, false},
    MaxConsumedWatts = {'u', {}, true, nil, false},
    MaxConsumedOccurredTime = {'u', {}, true, nil, false},
    MinConsumedWatts = {'u', {}, true, nil, false},
    StatisticsCollectedTime = {'u', {}, true, nil, false},
    AverageConsumedWatts = {'u', {}, true, nil, false},
    HeatKcal = {'u', {}, true, nil, false},
    EnergySavedPercent = {'y', {}, true, nil, false},
    EnergySavedKwh = {'d', {}, true, nil, false},
    CarbonEmissionsReducedKg = {'d', {}, true, nil, false},
    FanTotalPowerWatts = {'u', {'EMIT_CHANGE'}, true, nil, false},
    PredictedPowerSavedKwh = {'d', {}, true, nil, false},
    PredictedPowerSavedPercent = {'d', {}, true, nil, false},
    TotalPowerSavedKwh = {'d', {}, true, nil, false},
    TotalPowerSavedPercent = {'d', {}, true, nil, false},
    PowerPredictStatus = {'y', {}, true, nil, false},
    PowerPredictDescription = {'s', {}, true, nil, false},
    HistoryPowerAverageWatts = {'u', {}, true, nil, false},
    MinPowerWatts = {'u', {}, true, nil, false},
    MaxPowerWatts = {'u', {}, true, nil, false}
}, {
    PowerResetStatistics = {'a{ss}', '', TPowerResetStatisticsReq, TPowerResetStatisticsRsp},
    CollectPowerHistoryData = {'a{ss}ssu', 'u', TCollectPowerHistoryDataReq, TCollectPowerHistoryDataRsp},
    ResetPowerHistoryData = {'a{ss}su', '', TResetPowerHistoryDataReq, TResetPowerHistoryDataRsp},
    GetPowerHistoryData = {'a{ss}su', 'a(suuu)', TGetPowerHistoryDataReq, TGetPowerHistoryDataRsp},
    SetHighPowerThresholdWatts = {'a{ss}d', '', TSetHighPowerThresholdWattsReq, TSetHighPowerThresholdWattsRsp},
    GetPredictedPowerData = {'a{ss}', 'a(su)', TGetPredictedPowerDataReq, TGetPredictedPowerDataRsp},
    GetPredictedPowerSavedData = {'a{ss}', 'a(su)', TGetPredictedPowerSavedDataReq, TGetPredictedPowerSavedDataRsp}
}, {})

return EnergyMetric
